package edu.mapi.ir.viewer;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Image;

import javax.swing.JPanel;

import edu.mapi.ir.gui.GuiUtils;

/**
 * @author ZP
 */
public class IntroPanel extends JPanel {

	private Image img = GuiUtils.getImage("imgs/MazeViewer.png");
	private int imgWidth = img.getWidth(this), imgHeight = img.getHeight(this);
	
	public IntroPanel() {
		setBackground(Color.BLACK);		
	}
	
	@Override
	public void paint(Graphics g) {
		super.paint(g);
		g.drawImage(img, (getWidth() - imgWidth)/2, (getHeight()-imgHeight)/2, this);
	}
	
	public static void main(String[] args) {
		GuiUtils.testFrame(new IntroPanel());
	}
}
